package fr.aprr.geoloc.shared.domain;

// default package
// Generated Apr 23, 2014 11:01:50 PM by Hibernate Tools 4.0.0

import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * DistrictLimite generated by hbm2java
 */
@Entity
@Table(name = "ody$conf_district_limite", schema = "public")
public class DistrictLimite implements java.io.Serializable {

	private DistrictLimiteId id;
	private Autoroute autoroute;
	private District district;

	public DistrictLimite() {
	}

	public DistrictLimite(DistrictLimiteId id) {
		this.id = id;
	}

	public DistrictLimite(DistrictLimiteId id, Autoroute autoroute,
			District district) {
		this.id = id;
		this.autoroute = autoroute;
		this.district = district;
	}

	@EmbeddedId
	@AttributeOverrides({
			@AttributeOverride(name = "nomDistrict", column = @Column(name = "nom_district", length = 20)),
			@AttributeOverride(name = "autoroute", column = @Column(name = "autoroute", length = 8)),
			@AttributeOverride(name = "pkDebut", column = @Column(name = "pk_debut")),
			@AttributeOverride(name = "pkFin", column = @Column(name = "pk_fin")) })
	public DistrictLimiteId getId() {
		return this.id;
	}

	public void setId(DistrictLimiteId id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "autoroute", insertable = false, updatable = false)
	public Autoroute getAutoroute() {
		return this.autoroute;
	}

	public void setAutoroute(Autoroute autoroute) {
		this.autoroute = autoroute;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "nom_district", insertable = false, updatable = false)
	public District getDistrict() {
		return this.district;
	}

	public void setDistrict(District district) {
		this.district = district;
	}

}
